import http from "./request";

// 管理员登录
export const getAdminInfo = (data) => {
  return http.post("/adminLogin", data);
};

// 获取每日推荐列表
export const getDailyRecom = (params) => {
  return http.get("/gainDailyRecom", { params });
};

// 上传图片
export const uploadImage = (data) => {
  return http.post("/imageUpload", data, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

// 提交每日推荐
export const uploadDailyRecom = (data) => {
  return http.post("/dailyRecom", data);
};

// 搜索省市数据
export const searchChinaData = (keywords) => {
  return http.get("/china-data", { params: keywords });
};
